<!DOCTYPE html>
<html lang=en>
<head>
    <!-- so meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="HandheldFriendly" content="True">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" />
    <meta name="description" content="FIRST集构造对于一条产生式：S-&gt;…  若右边第一个符号是终结符或者ε，则 将其加入FIRST(S) 若右边第一个符号是非终结符，则将其FIRST集加入FIRST(S) 若右边第一个符号是非终结符，且随后紧跟多个非终结符，这是判断是否有ε 若第i个非终结符有ε集，则可将i+1个非终结符去除ε的FIRST集加入FIRST(S) 若所有非终结符都能够推导出ε，则将ε也加入FIRST(S)">
<meta property="og:type" content="article">
<meta property="og:title" content="构造FIRST集、FOLLOW集、 LL(1)预测分析表">
<meta property="og:url" content="https://cheung0-bit.github.io/8b6d5177f990/index.html">
<meta property="og:site_name" content="Bruce Zhang&#39;s Blogs">
<meta property="og:description" content="FIRST集构造对于一条产生式：S-&gt;…  若右边第一个符号是终结符或者ε，则 将其加入FIRST(S) 若右边第一个符号是非终结符，则将其FIRST集加入FIRST(S) 若右边第一个符号是非终结符，且随后紧跟多个非终结符，这是判断是否有ε 若第i个非终结符有ε集，则可将i+1个非终结符去除ε的FIRST集加入FIRST(S) 若所有非终结符都能够推导出ε，则将ε也加入FIRST(S)">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2022-12-02T07:28:52.661Z">
<meta property="article:modified_time" content="2022-12-02T07:31:43.631Z">
<meta property="article:author" content="张林">
<meta property="article:tag" content="编译原理">
<meta name="twitter:card" content="summary">
    
    
      
        
          <link rel="shortcut icon" href="/images/favicon.ico">
        
      
      
        
          <link rel="icon" type="image/png" href="/images/favicon-192x192.png" sizes="192x192">
        
      
      
        
          <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
        
      
    
    <!-- title -->
    <title>构造FIRST集、FOLLOW集、 LL(1)预测分析表</title>
    <!-- styles -->
    
<link rel="stylesheet" href="/css/style.css">

    <!-- persian styles -->
    
    <!-- rss -->
    
    
      <link rel="alternate" href="/atom.xml" title="Bruce Zhang&#39;s Blogs" type="application/atom+xml" />
    
	<!-- mathjax -->
	
<meta name="generator" content="Hexo 7.0.0"></head>

<body class="max-width mx-auto px3 ltr">
    
      <div id="header-post">
  <a id="menu-icon" href="#" aria-label="Menu"><i class="fas fa-bars fa-lg"></i></a>
  <a id="menu-icon-tablet" href="#" aria-label="Menu"><i class="fas fa-bars fa-lg"></i></a>
  <a id="top-icon-tablet" href="#" aria-label="Top" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');" style="display:none;"><i class="fas fa-chevron-up fa-lg"></i></a>
  <span id="menu">
    <span id="nav">
      <ul>
        <!--
       --><li><a href="/">Home</a></li><!--
     --><!--
       --><li><a href="/about/">About</a></li><!--
     --><!--
       --><li><a href="/archives/">Articles</a></li><!--
     --><!--
       --><li><a href="/categories/">Category</a></li><!--
     --><!--
       --><li><a href="/search/">Search</a></li><!--
     -->
      </ul>
    </span>
    <br/>
    <span id="actions">
      <ul>
        
        <li><a class="icon" aria-label="Previous post" href="/07a6b2ca1e89/"><i class="fas fa-chevron-left" aria-hidden="true" onmouseover="$('#i-prev').toggle();" onmouseout="$('#i-prev').toggle();"></i></a></li>
        
        
        <li><a class="icon" aria-label="Next post" href="/c38d47a6babf/"><i class="fas fa-chevron-right" aria-hidden="true" onmouseover="$('#i-next').toggle();" onmouseout="$('#i-next').toggle();"></i></a></li>
        
        <li><a class="icon" aria-label="Back to top" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up" aria-hidden="true" onmouseover="$('#i-top').toggle();" onmouseout="$('#i-top').toggle();"></i></a></li>
        <li><a class="icon" aria-label="Share post" href="#"><i class="fas fa-share-alt" aria-hidden="true" onmouseover="$('#i-share').toggle();" onmouseout="$('#i-share').toggle();" onclick="$('#share').toggle();return false;"></i></a></li>
      </ul>
      <span id="i-prev" class="info" style="display:none;">Previous post</span>
      <span id="i-next" class="info" style="display:none;">Next post</span>
      <span id="i-top" class="info" style="display:none;">Back to top</span>
      <span id="i-share" class="info" style="display:none;">Share post</span>
    </span>
    <br/>
    <div id="share" style="display: none">
      <ul>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.facebook.com/sharer.php?u=https://cheung0-bit.github.io/8b6d5177f990/"><i class="fab fa-facebook " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://twitter.com/share?url=https://cheung0-bit.github.io/8b6d5177f990/&text=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-twitter " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.linkedin.com/shareArticle?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-linkedin " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://pinterest.com/pin/create/bookmarklet/?url=https://cheung0-bit.github.io/8b6d5177f990/&is_video=false&description=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-pinterest " aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=构造FIRST集、FOLLOW集、 LL(1)预测分析表&body=Check out this article: https://cheung0-bit.github.io/8b6d5177f990/"><i class="fas fa-envelope " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://getpocket.com/save?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-get-pocket " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://reddit.com/submit?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-reddit " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.stumbleupon.com/submit?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-stumbleupon " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://digg.com/submit?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-digg " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.tumblr.com/share/link?url=https://cheung0-bit.github.io/8b6d5177f990/&name=构造FIRST集、FOLLOW集、 LL(1)预测分析表&description="><i class="fab fa-tumblr " aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://news.ycombinator.com/submitlink?u=https://cheung0-bit.github.io/8b6d5177f990/&t=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-hacker-news " aria-hidden="true"></i></a></li>
</ul>

    </div>
    <div id="toc">
      <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#FIRST%E9%9B%86%E6%9E%84%E9%80%A0"><span class="toc-number">1.</span> <span class="toc-text">FIRST集构造</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#FOLLOW%E9%9B%86%E6%9E%84%E9%80%A0"><span class="toc-number">2.</span> <span class="toc-text">FOLLOW集构造</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%A2%84%E6%B5%8B%E8%A1%A8%E7%9A%84%E6%9E%84%E9%80%A0"><span class="toc-number">3.</span> <span class="toc-text">预测表的构造</span></a></li></ol>
    </div>
  </span>
</div>

    
    <div class="content index py4">
        
        <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
  <header>
    
    <h1 class="posttitle" itemprop="name headline">
        构造FIRST集、FOLLOW集、 LL(1)预测分析表
    </h1>



    <div class="meta">
      <span class="author" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <span itemprop="name">张林</span>
      </span>
      
    <div class="postdate">
      
        <time datetime="2022-12-02T07:28:52.661Z" itemprop="datePublished">2022-12-02</time>
        
        (Updated: <time datetime="2022-12-02T07:31:43.631Z" itemprop="dateModified">2022-12-02</time>)
        
      
    </div>


      
    <div class="article-category">
        <i class="fas fa-archive"></i>
        <a class="category-link" href="/categories/%E5%BC%80%E5%8F%91%E5%AE%9E%E8%B7%B5/">开发实践</a>
    </div>


      
    <div class="article-tag">
        <i class="fas fa-tag"></i>
        <a class="tag-link-link" href="/tags/%E7%BC%96%E8%AF%91%E5%8E%9F%E7%90%86/" rel="tag">编译原理</a>
    </div>


    </div>
  </header>
  

  <div class="content" itemprop="articleBody">
    <h2 id="FIRST集构造"><a href="#FIRST集构造" class="headerlink" title="FIRST集构造"></a>FIRST集构造</h2><p>对于一条产生式：S-&gt;…</p>
<ol>
<li>若右边第一个符号是终结符或者ε，则 将其加入FIRST(S)</li>
<li>若右边第一个符号是非终结符，则将其FIRST集加入FIRST(S)</li>
<li>若右边第一个符号是非终结符，且随后紧跟多个非终结符，这是判断是否有ε<ol>
<li>若<strong>第i个</strong>非终结符有ε集，则可将<strong>i+1</strong>个非终结符去除ε的FIRST集加入FIRST(S)</li>
<li>若所有非终结符都能够推导出ε，则将ε也加入FIRST(S)</li>
</ol>
</li>
</ol>
<p>e.g 若给出G(S)如下</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">S-&gt;ABCD</span><br><span class="line">A-&gt;a|ε</span><br><span class="line">B-&gt;b|ε</span><br><span class="line">C-&gt;c</span><br><span class="line">D-&gt;d</span><br></pre></td></tr></table></figure>

<p>则FIRST(S)&#x3D; a,b,c</p>
<h2 id="FOLLOW集构造"><a href="#FOLLOW集构造" class="headerlink" title="FOLLOW集构造"></a>FOLLOW集构造</h2><ol>
<li>将所有产生式的候选式的非终结符都找到，定位到求解的FOLLOW集的非终结符的位置，从当前位置挨个检查</li>
<li>先检验这个非终结符的右边有无别的符号，例如<code>A-&gt;aBC</code>，求FOLLOW(B)时，其右侧有非终结符C的<ol>
<li>将右边符号的FIRST集中非空符号加入当前符号的FOLLOW集，若右边符号FIRST含有ε，则将FOLLOW(A)也加入FOLLOW(B)</li>
<li>若右边没有符号了，例如这里的 C，那么可以将 FOLLOW(A)中的元素全部加入到 FOLLOW(C)中</li>
</ol>
</li>
<li>断当前符号是不是文法的开始符号，比如 G[A] 中的非终结符 A 就是 G[A] 文法的开始符号，如果是的话就将“#”也加入到 FOLLOW集中去</li>
</ol>
<p>e.g 若给出文法如下</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">E-&gt;E+T|T</span><br><span class="line">F-&gt;(E)|i</span><br><span class="line">T-&gt;F|T*E</span><br></pre></td></tr></table></figure>

<table>
<thead>
<tr>
<th align="center"></th>
<th align="center">FIRST</th>
<th align="center">FOLLOW</th>
</tr>
</thead>
<tbody><tr>
<td align="center">E</td>
<td align="center">( i</td>
<td align="center"># ) +</td>
</tr>
<tr>
<td align="center">F</td>
<td align="center">( i</td>
<td align="center"># ) + *</td>
</tr>
<tr>
<td align="center">T</td>
<td align="center">( i</td>
<td align="center"># ) + *</td>
</tr>
</tbody></table>
<h2 id="预测表的构造"><a href="#预测表的构造" class="headerlink" title="预测表的构造"></a>预测表的构造</h2><p>首先构造出预测分析表的第一行与第一列，第一行为文法出现的所有终结符以及‘#’（注意：没有 ε ，因为 Follow 集不含 ε），第一列为文法出现的所有非终结符</p>
<p>对文法G的每个产生式A-&gt;α 执行如下步骤：</p>
<ol>
<li><p>对每个a∈First(α)，把 A-&gt;α 加入M[A,a]</p>
</li>
<li><p>若 ε∈First(α)，则对任何b∈Follow(A) ,把 A-&gt; ε加至M[A,b]中</p>
</li>
</ol>
<p>对如下文法</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">S-&gt;AaS|BbS|d</span><br><span class="line">A-&gt;a</span><br><span class="line">B-&gt;ε|c</span><br></pre></td></tr></table></figure>

<p>举个例子，对于第一个产生式，FIRST(AaS)&#x3D;{a}，则将S-&gt;AaS加入到[S,a]</p>
<table>
<thead>
<tr>
<th></th>
<th>a</th>
<th>b</th>
<th>c</th>
<th>d</th>
</tr>
</thead>
<tbody><tr>
<td>S</td>
<td>S-&gt;AaS</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>A</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>B</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody></table>
<p>而对于B-&gt;ε，计算FOLLOW(B)中的所有元素将其加入。FOLLOW(B) &#x3D; { b }，所以将产生式加入到M[B,b]</p>
<table>
<thead>
<tr>
<th></th>
<th>a</th>
<th>b</th>
<th>c</th>
<th>d</th>
</tr>
</thead>
<tbody><tr>
<td>S</td>
<td>S-&gt;AaS</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>A</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>B</td>
<td></td>
<td>B-&gt;ε</td>
<td></td>
<td></td>
</tr>
</tbody></table>
<p>最后得到的完整LL(1)分析表</p>
<table>
<thead>
<tr>
<th></th>
<th>a</th>
<th>b</th>
<th>c</th>
<th>d</th>
</tr>
</thead>
<tbody><tr>
<td>S</td>
<td>S-&gt;AaS</td>
<td>S-&gt;BbS</td>
<td>S-&gt;BbS</td>
<td>S-&gt;d</td>
</tr>
<tr>
<td>A</td>
<td>A-&gt;a</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>B</td>
<td></td>
<td>B-&gt;ε</td>
<td>B-&gt;c</td>
<td></td>
</tr>
</tbody></table>

  </div>
</article>


    <div class="blog-post-comments">
        <div id="utterances_thread">
            <noscript>Please enable JavaScript to view the comments.</noscript>
        </div>
    </div>


        
          <div id="footer-post-container">
  <div id="footer-post">

    <div id="nav-footer" style="display: none">
      <ul>
         
          <li><a href="/">Home</a></li>
         
          <li><a href="/about/">About</a></li>
         
          <li><a href="/archives/">Articles</a></li>
         
          <li><a href="/categories/">Category</a></li>
         
          <li><a href="/search/">Search</a></li>
        
      </ul>
    </div>

    <div id="toc-footer" style="display: none">
      <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#FIRST%E9%9B%86%E6%9E%84%E9%80%A0"><span class="toc-number">1.</span> <span class="toc-text">FIRST集构造</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#FOLLOW%E9%9B%86%E6%9E%84%E9%80%A0"><span class="toc-number">2.</span> <span class="toc-text">FOLLOW集构造</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E9%A2%84%E6%B5%8B%E8%A1%A8%E7%9A%84%E6%9E%84%E9%80%A0"><span class="toc-number">3.</span> <span class="toc-text">预测表的构造</span></a></li></ol>
    </div>

    <div id="share-footer" style="display: none">
      <ul>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.facebook.com/sharer.php?u=https://cheung0-bit.github.io/8b6d5177f990/"><i class="fab fa-facebook fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://twitter.com/share?url=https://cheung0-bit.github.io/8b6d5177f990/&text=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-twitter fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.linkedin.com/shareArticle?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://pinterest.com/pin/create/bookmarklet/?url=https://cheung0-bit.github.io/8b6d5177f990/&is_video=false&description=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-pinterest fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" href="mailto:?subject=构造FIRST集、FOLLOW集、 LL(1)预测分析表&body=Check out this article: https://cheung0-bit.github.io/8b6d5177f990/"><i class="fas fa-envelope fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://getpocket.com/save?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-get-pocket fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://reddit.com/submit?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-reddit fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.stumbleupon.com/submit?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-stumbleupon fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://digg.com/submit?url=https://cheung0-bit.github.io/8b6d5177f990/&title=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-digg fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="http://www.tumblr.com/share/link?url=https://cheung0-bit.github.io/8b6d5177f990/&name=构造FIRST集、FOLLOW集、 LL(1)预测分析表&description="><i class="fab fa-tumblr fa-lg" aria-hidden="true"></i></a></li>
  <li><a class="icon" target="_blank" rel="noopener" href="https://news.ycombinator.com/submitlink?u=https://cheung0-bit.github.io/8b6d5177f990/&t=构造FIRST集、FOLLOW集、 LL(1)预测分析表"><i class="fab fa-hacker-news fa-lg" aria-hidden="true"></i></a></li>
</ul>

    </div>

    <div id="actions-footer">
        <a id="menu" class="icon" href="#" onclick="$('#nav-footer').toggle();return false;"><i class="fas fa-bars fa-lg" aria-hidden="true"></i> Menu</a>
        <a id="toc" class="icon" href="#" onclick="$('#toc-footer').toggle();return false;"><i class="fas fa-list fa-lg" aria-hidden="true"></i> TOC</a>
        <a id="share" class="icon" href="#" onclick="$('#share-footer').toggle();return false;"><i class="fas fa-share-alt fa-lg" aria-hidden="true"></i> Share</a>
        <a id="top" style="display:none" class="icon" href="#" onclick="$('html, body').animate({ scrollTop: 0 }, 'fast');"><i class="fas fa-chevron-up fa-lg" aria-hidden="true"></i> Top</a>
    </div>

  </div>
</div>

        
        <footer id="footer">
  <div class="footer-left">
    Copyright &copy;
      
        
          2022-2024
            <a target="_blank" rel="noopener" href="https://beian.miit.gov.cn/">
              苏ICP备2022044873号
            </a>
  </div>
  <div class="footer-right">
    <nav>
      <ul>
        
          <!--
       -->
          <li><a href="/">
              Home
            </a></li>
          <!--
     -->
          
          <!--
       -->
          <li><a href="/about/">
              About
            </a></li>
          <!--
     -->
          
          <!--
       -->
          <li><a href="/archives/">
              Articles
            </a></li>
          <!--
     -->
          
          <!--
       -->
          <li><a href="/categories/">
              Category
            </a></li>
          <!--
     -->
          
          <!--
       -->
          <li><a href="/search/">
              Search
            </a></li>
          <!--
     -->
          
      </ul>
    </nav>
  </div>
</footer>
    </div>
    <!-- styles -->


 
  <link
    rel="preload"
    href="/lib/font-awesome/css/all.min.css"
    as="style"
    onload="this.onload=null;this.rel='stylesheet'"
  />
  <noscript
    ><link
      rel="stylesheet"
      href="/lib/font-awesome/css/all.min.css"
  /></noscript>



    <!-- jquery -->
 
  
<script src="/lib/jquery/jquery.min.js"></script>





<!-- clipboard -->

   
    
<script src="/lib/clipboard/clipboard.min.js"></script>

  
  <script type="text/javascript">
  $(function() {
    // copy-btn HTML
    var btn = "<span class=\"btn-copy tooltipped tooltipped-sw\" aria-label=\"Copy to clipboard!\">";
    btn += '<i class="far fa-clone"></i>';
    btn += '</span>'; 
    // mount it!
    $(".highlight table").before(btn);
    var clip = new ClipboardJS('.btn-copy', {
      text: function(trigger) {
        return Array.from(trigger.nextElementSibling.querySelectorAll('.code')).reduce((str,it)=>str+it.innerText+'\n','')
      }
    });
    clip.on('success', function(e) {
      e.trigger.setAttribute('aria-label', "Copied!");
      e.clearSelection();
    })
  })
  </script>


<script src="/js/main.js"></script>

<!-- search -->

<!-- Google Analytics -->

<!-- Baidu Analytics -->

  <script type="text/javascript">
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?4484a4a33014b59670c470a6e15a66db";
          var s = document.getElementsByTagName("script")[0];
          s.parentNode.insertBefore(hm, s);
        })();
        </script>

<!-- Cloudflare Analytics -->

<!-- Umami Analytics -->

<!-- Disqus Comments -->

<!-- utterances Comments -->

    <script type="text/javascript">
      var utterances_repo = 'Cheung0-bit/blog-package';
      var utterances_issue_term = 'title';
      var utterances_label = 'Comment';
      var utterances_theme = 'github-dark';

      (function(){
          var script = document.createElement('script');

          script.src = 'https://utteranc.es/client.js';
          script.setAttribute('repo', utterances_repo);
          script.setAttribute('issue-term', 'pathname');
          script.setAttribute('label', utterances_label);
          script.setAttribute('theme', utterances_theme);
          script.setAttribute('crossorigin', 'anonymous');
          script.async = true;
          (document.getElementById('utterances_thread')).appendChild(script);
      }());
  </script>

</body>
</html>
